package com.jy.view;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ForwardURL {
	
	/**
	 * 访问项目跳转到主页
	 * @param request
	 * @param response
	 * @param modelMap
	 * @return
	 */
	@RequestMapping(value = "/")
	public String toIndex(HttpServletRequest request,HttpServletResponse response, ModelMap modelMap) {
		return "index";	// 主页
	}
	
	@RequestMapping(value = "/login")
	public String login(HttpServletRequest request,HttpServletResponse response, ModelMap modelMap) {
		return "login";	// 登录页面
	}
	
	@RequestMapping(value = "/unauthorized")
	public String unauthorized(HttpServletRequest request,HttpServletResponse response, ModelMap modelMap) {
		return "unauthorized";	// 无权访问页面
	}
}
